import log from '../../../logutil';
import api from '../../api';
export default class dailyNoteApi extends api{
  constructor() {
    super();
    this.url = "https://api-takumi-record.mihoyo.com/game_record/app/genshin/api/dailyNote"
    this.query = new Map()
    this.query.set("server","cn_gf01")
    this.query.set("role_id","118238598")
  }
  getQueryStr():string{
    if(this.query.get("server") === undefined || this.query.get("server") === null){
      log.error(dailyNoteApi.name,"missing key of server")
      throw new Error("missing key of server")
    }
    if(this.query.get("role_id") === undefined || this.query.get("role_id") === null){
      log.error(dailyNoteApi.name,"missing key of role_id")
      throw new Error("missing key of role_id")
    }
    return `role_id=${this.query.get("role_id")}&server=${this.query.get("server")}`
  }
}